package com.xc.freeapp.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xc.freeapp.dao.IgnoreMessageMapper;
import com.xc.freeapp.entity.IgnoreMessage;
import com.xc.freeapp.service.IgnoreMessageService;
@Service
public class IgnoreMessageServiceImpl implements IgnoreMessageService {
	 @Autowired
	 IgnoreMessageMapper ignoreMessageMapper;
	 public  int insert(IgnoreMessage record){
		return  ignoreMessageMapper.insert(record);
	 }
	 public IgnoreMessage selectByuseridAndMessageid(Integer userid,Integer messageid){
		 Map map=new HashMap();
		 map.put("userid", userid);
		 map.put("messageid", messageid);
		return ignoreMessageMapper.selectByuseridAndMessageid(map);
		 
	 }
	@Override
	public int updatedelflag(IgnoreMessage record) {
		// TODO Auto-generated method stub
		return ignoreMessageMapper.updateDelflag(record.getId().toString());
	}
	
}
